<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>js</title>
</head>
<body>
	<h1  id='hid'>linux is <i>very</i>  much!</h1>
</body>
<script>
	
	
	hidobj=document.getElementById('hid');

	//textContent获取标签内容,不识别标签内的标签
	//innerHTML获取标签内容,识别标签内的标签
	alert(hidobj.textContent); //textContent获取标签内部的文本
	
</script>
</html>